﻿CREATE TABLE [dbo].[ArticolePreturi] (
    [IDArticolPret]   INT             IDENTITY (1, 1) NOT NULL,
    [IDArticol]       INT             NOT NULL,
    [IDPartener]      BIGINT          NOT NULL,
    [PretVanzare]     DECIMAL (25, 2) NOT NULL,
    [CodValuta]       SMALLINT        NOT NULL,
    [DataAplicare]    DATETIME        DEFAULT (getdate()) NOT NULL,
    [NrMinimArticole] INT             NULL,
    [NrMaximArticole] INT             NULL,
    [Observatii]      VARCHAR (250)   NULL,
    CONSTRAINT [PK_ArticolePreturi] PRIMARY KEY CLUSTERED ([IDArticolPret] ASC),
    CONSTRAINT [FK_ArticolePreturi_Articole] FOREIGN KEY ([IDArticol]) REFERENCES [dbo].[Articole] ([IDArticol]),
    CONSTRAINT [FK_ArticolePreturi_Parteneri] FOREIGN KEY ([IDPartener]) REFERENCES [dbo].[Parteneri] ([IDPartener]),
    CONSTRAINT [FK_ArticolePreturi_Valuta] FOREIGN KEY ([CodValuta]) REFERENCES [dbo].[Valuta] ([CodValuta])
);

